home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
301-325
/
disk_313
/
uucp
/
uucp1.lzh
/
src
/
lib
/
lsys.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-14
|
621b
|
39 lines
/*
* LSYS.C
*
* (C) Copyright 1989-1990 by Matthew Dillon, All Rights Reserved.
*
*/
#include <stdio.h>
int
is_in_L_sys_file(system_name)
char *system_name;
{
static char buf[256];
static char system[128];
FILE *fd;
if (!(fd = fopen("UULIB:L.sys","r"))) {
printf("Couldn't open UULIB:L.sys file\n");
exit(1);
}
sprintf(system,"%s ", system_name);
while (NULL != fgets(buf, sizeof buf, fd)) {
if (buf[0] == '#' || buf[0] == '\n')
continue;
if (strncmp(buf, system, strlen(system)) == 0) {
fclose(fd);
return TRUE;
}
}
fclose(fd);
return FALSE;
}